package com.example.demo.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * Created by lyc on 2019/6/8.
 */
@Component
@Data
@ConfigurationProperties(prefix = "hello") //指定前缀匹配 application.properties 如
/**
 * #获取配置文件
 hello.name=hello
 hello.age=18
 */
public class Hello {

    private String name;

    private int age;


}
